package com.saguitech.sgemeos.ui.adapters;

import java.util.List;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

import com.saguitech.sgemeos.R;
import com.saguitech.sgemeos.business.ExpositorBusiness;

public class ExpositorArrayAdapter extends ArrayAdapter<ExpositorBusiness>{

	private Context context;
	private List<ExpositorBusiness> listExpositors;

	public ExpositorArrayAdapter(Context context,
			List<ExpositorBusiness> listExpositors) {
		super(context, R.layout.expositor_row, listExpositors);
		this.context = context;
		this.listExpositors = listExpositors;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		LayoutInflater inflater = (LayoutInflater) context
				.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
		View rowView = inflater.inflate(R.layout.expositor_row, null, true);
		TextView expositorNameTV = (TextView) rowView.findViewById(R.id.expositorNameTV);
		expositorNameTV.setText(listExpositors.get(position).getName());
		return rowView;
	}
	
	
	
}
